package org.spring.sample.data.jpa.dao;


import org.spring.sample.data.jpa.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
public interface UserReponsitory extends JpaRepository<User, Integer>{
	
	@Modifying
	@Transactional
	@Query("update t_user t set name = :name where id = :id")
	public int update(@Param("name") String name,@Param("id") Integer id);
	
	
}
